package com.yanqu.road.utils.math;

import java.math.BigDecimal;
import java.math.BigInteger;

public class MathUtil {
    public static double customLog(double base, double logNumber) {
        return Math.log(logNumber) / Math.log(base);
    }

    public static double customPow(double base, double exponent, int pointNum) {
        Double result = Math.pow(base, exponent);
        BigDecimal b = new BigDecimal(result);
        return b.setScale(pointNum, BigDecimal.ROUND_HALF_UP).doubleValue();
    }

}
